using Dapper;
using SmartLink.Domain.Entity;
using SmartLink.IRepository;
using SmartLink.Repository.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartLink.Repository
{
    public class BIZ_UserToPlateRepo : RepositoryBase<BIZ_UserToPlate>, IBIZ_UserToPlateRepo
    {
        public IList<BIZ_UserToPlate> GetPlateByUserID(int userId)
        {
            IList<BIZ_UserToPlate> reResult = null;
            var sql = @"select * from  BIZ_UserToPlate where userId = @userId";
            var parms = new { userId = userId };
            using (var conn = DapperHelper.GetDefaultConnection())
            {
                reResult = conn.Query<BIZ_UserToPlate>(sql, parms).ToList();
                return reResult;
            }
        }

    }
}
